<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<link rel="stylesheet" href="__ADMIN_PUBLIC__css/public.css" />
		<script type="text/javascript" src="__ADMIN_PUBLIC__js/jquery-1.7.2.min.js"></script>
		<!--<script type="text/javascript" src="__ADMIN_PUBLIC__js/public.js"></script>-->
		<script type="text/javascript" src="__ADMIN_PUBLIC__js/postcontent.js"></script>
       <!-- 配置文件 -->
    <script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <link href="__STATIC__/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>
	<title>发布内容</title>
<style>
.del ,.look{
	padding: 5px 10px;
	display: inline-block;
	border: 1px solid #DDDDDD;
	border-radius: 5px;
	cursor: pointer;
}
.imgshow{
	display: none;
}
</style>
<script type="text/javascript">
var APP = "<?php echo 'http://'.$_SERVER['HTTP_HOST'].'/'; ?>";	
</script>
</head>
<script type="text/javascript">
$(function(){
	var image = $('.imginput').html();
	var imageinput = $('.imagesInput').html();
	if(imageinput != '' && imageinput != null){
		
	}else{
		$('.imageInput').remove();
	}
})
</script>
<body>
	<form action="" method="post" enctype="multipart/form-data" method="post" >

	
		<table class="table">
			<tr >
				<td class="th" colspan="2">添加内容</td>
			</tr>
			<tr>
				<td>当前所属栏目</td>
				<td>
					<span class="tdLtitle8" style="padding:8px;">{$modelField.name}</span>	

				</td>
			</tr>
			<tr>
				<td>标题</td>
				<td><input type="text" name="atitle" class="tdLtitle8"/></td>
			</tr>
			<tr>
				<td>副标题</td>
				<td><input type="text" name="asubtitle" class="tdLtitle8"/></td>
			</tr>
			<tr>
				<td>置顶信息</td>
				<td><input class='np' type='checkbox' name='aattr[]' id='aattrh' value='h'>头条[h]<input class='np' type='checkbox' name='aattr[]' id='aattrc' value='c'>推荐[c]<input class='np' type='checkbox' name='aattr[]' id='aattrf' value='f'>幻灯[f]<input class='np' type='checkbox' name='aattr[]' id='aattra' value='a'>特荐[a]<input class='np' type='checkbox' name='aattr[]' id='aattrs' value='s'>滚动[s]<input class='np' type='checkbox' name='aattr[]' id='aattrb' value='b'>加粗[b]<input class='np' type='checkbox' name='aattr[]' id='aattrp' value='p'>图片[p]<input class='np' type='checkbox' name='aattr[]' id='aattrj' value='j' onclick='ShowUrlTr()'>跳转[j]            </td>
       </td>
			</tr>
			<tr>
				<td>文章来源</td>
				<td><input type="text" name="asource" class="tdLtitle8"/></td>
			</tr>
			<tr>
				<td>关键字</td>
				<td><input type="text" name="akeywords" class="tdLtitle8"/></td>
			</tr>
			<tr>
				<td>TAG标签</td>
				<td><input type="text" name="content_rule" class="tdLtitle8"/>(多个标签用','号分开，单个标签小于12字节)</td>
			</tr>

           
            <tr class="tab1 imageInput" >
                <th class="w100">图集上传</th>
                <td>
                  <div lab="uploadFile">
                <input id="listIMg" type="file" name="imgtest" multiple="true">
                <span>类型: *.jpg 大小: 2000KB 数量: 5</span>
                <script type="text/javascript">
                    $(function() {
                        $('#listIMg').uploadify({
                            'formData'     : {	//POST数据
                                'session_id' : '<?php echo session_id(); ?>',
                            },
                            'fileTypeDesc' : '上传文件',//上传描述
                            'fileTypeExts' : '*.jpg',
                            'swf'      : '__STATIC__uploadify/uploadify.swf',
                            'uploader' : '{:U('Admin/content/uploadImg')}',
                            'buttonText':'选择文件',
                            'fileSizeLimit' : '3000KB',
                            'uploadLimit' : 1000,//上传文件数
                            'width':65,
//                          'debug':true,
                            'height':25,
                            'successTimeout':10,//等待服务器响应时间
                            'removeTimeout' : 0.2,//成功显示时间
                            'onUploadSuccess' : function(file, data, response) {
                                data=$.parseJSON(data);
//                              alert(data.length);alert(data[0]);
                                var imageUrl = data.image?data.url:'__STATIC__/image/default.png';
                                 li="<li path='"+data.path+"' url='"+data.path+data.name+"' style='float:left;'><img src='__ROOT__/"+data.path+data.name+"'  width='100' height='100'  /><div class='hiddenli' style='position: relative;'><span class='look'>查看</span><span class='del' >删除</span><span class='imgshow' style='position: absolute;z-index:1000;'><img src='__ROOT__/"+data.path+data.name+"' /><span class='close'></span></span></div></li>";
                                $(".showGoosListIMg").prepend(li);
                                $('#inputHidden').append('<li>'+data.path+data.name+'</li>');
                                //获取图片域值
                               var smallIMg =  $('#thumbimg').val();
                                $('#thumbimg').val(smallIMg+','+data.path+data.name);
                            }
                        });
                    });
                </script>
                	<!--异步隐藏内容-->
                	<div id='inputHidden'  style="display: none;">
                		<input type="hidden" name="ipic" value="" id="thumbimg" />
                		
                	</div>
                </td>
                
            </tr>
            
            <tr class="imageInput"  style="">
                <td class="w100">列表图预览</td>
                <td class='showGoosListIMg' width="650"> </td>
            </tr>
            
		
			
			<tr>
				<td>文章摘要</td>
				<td><textarea name="adigest" id="" cols="50" rows="6"></textarea></td>
			</tr>
			<input type="hidden" value="{$modelField.mid}" name="amodel_id" />
			<input type="hidden" value="<?php echo $_GET['cid']; ?>" name="cid" />
		{$str}

			<tr>
				<td colspan="2">
					<input type="submit" value="添加" class="input_button"/>
					
				</td>
			</tr>
		</table>
	</form>
</body>
</html>